Перейти к основному содержимому

Reseller Renew User Subscription with Current Group API

POST /resellerRenewUserSubscriptionWithCurrentGroup

Description

This API endpoint allows resellers to renew a user's subscription while keeping them in their current group. The renewal updates the subscription details such as duration and bandwidth limits.

Request Body

The request utilizes GraphQL to perform the resellerRenewUserSubscriptionWithCurrentGroup mutation.

Mutation:

mutation resellerRenewUserSubscriptionWithCurrentGroup ($username: String!) {
resellerRenewUserSubscriptionWithCurrentGroup (username: $username) {
duration
multiLoginCount
expiresAt
createdAt
updatedAt
dailyBandwidth
downloadUpload
}
}

Variables:

{
"username": "<User_Username>"
}
  • username (String): The username of the user whose subscription is to be renewed.

Response:

  • Success (200 OK):

    • If the renewal is successful, the response will include the updated subscription details.
    {
    "data": {
    "resellerRenewUserSubscriptionWithCurrentGroup": {
    "duration": "<New_Duration>",
    "multiLoginCount": "<Updated_Login_Count>",
    "expiresAt": "<New_Expiry_Date>",
    "createdAt": "<Creation_Date>",
    "updatedAt": "<Update_Date>",
    "dailyBandwidth": "<Updated_Bandwidth>",
    "downloadUpload": "<Updated_Download_Upload_Details>"
    }
    }
    }
  • Error (4XX/5XX):

    • If there is an issue with the renewal process, the response will include an appropriate error message and status code.

Note:

Ensure that the provided username is valid and active. This API will renew the user's subscription for the current group, updating the subscription's duration and other related attributes.